package com.smile.api;

import cn.hutool.core.bean.BeanUtil;
import com.smile.commons.page.R;
import com.smile.model.request.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "smile-plus-standalone-device", contextId = "fly", path = "/api/device")
public interface FlyApi {

    /**
     * 一键飞往目标点
     *
     * @param flyToPointRequest
     * @return
     * @throws Exception
     */
    @PostMapping("/fly/flyToPoint")
    R<Void> flyToPoint(@RequestBody FlyToPointRequest flyToPointRequest) throws Exception;

    @PostMapping("/fly/takeoffToPoint")
    R<Void> takeoffToPoint(@RequestBody TakeOffToPointRequest takeOffToPointRequest) throws Exception;


    @Deprecated
    @PostMapping("/fly/drcModeEnter")
    R<Void> drcModeEnter(@RequestBody DrcModeEnterRequest drcModeEnterRequest) throws Exception;

    /**
     * 杆量控制
     *
     * @return
     * @throws Exception
     */
    @PostMapping("/fly/stickControl")
    R<Void> stickControl(@RequestBody StickControlRequest stickControlRequest) throws Exception;

    @PostMapping("/fly/droneEmergencyStop")
    R<Void> droneEmergencyStop(@RequestBody DroneEmergencyStopRequest droneEmergencyStopRequest) throws Exception;

    @PostMapping("/fly/flighttaskUndo")
    R<Void> flighttaskUndo(@RequestBody FlighttaskUndoRequest flighttaskUndoRequest) throws Exception;
}